package com.tbs.easyhomemoneyserver.dao

import com.tbs.easyhomemoneyserver.DO.LoginInfo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Select
import tk.mybatis.mapper.common.BaseMapper

/**
 * @author tongj
 */
@Mapper
interface LoginInfoDao : BaseMapper<LoginInfo> {
    @Select(
        "select * from easy_home_money.login_info " +
                "where user_id=#{param1} " +
                "and login_flag=1 " + "and delete_mark=0 " +
                "order by login_time desc limit 1"
    )
    fun findNearestLoginInfo(userid: Long): List<LoginInfo>
}
